package com.app.controller;

import com.app.service.MotionVideoService;
import com.app.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 动态视频
 */
@Controller
@RestController
@RequestMapping("/api")
public class MotionVideoController {
    @Autowired
    private MotionVideoService motionVideoService;

    //列表
    @GetMapping("/getVideoList")
    public Result<Object> getVideoList(Integer page, Integer limit, String keyword, Integer type) {
        return Result.success(motionVideoService.getList(page, limit, keyword, type));
    }

    //查看详情
    @GetMapping("/getVideoInfo")
    public Result<Object> getVideoInfo(Integer id) {
        return Result.success(motionVideoService.selectById(id));
    }
}
